<%--
  Created by IntelliJ IDEA.
  User: Shinelon
  Date: 2020/11/26
  Time: 18:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/style/assets/css/style.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/style/assets/css/responsive.css">
    <script src="${pageContext.request.contextPath}/style/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/style/layui/css/layui.css">
    <script src="${pageContext.request.contextPath}/style/layui/layui.js"></script>
</head>
<body>

<form class="layui-form layui-form-pane"  lay-filter="add">
    <div class="layui-row">
        <!--栅格化 时间部分 -->
        <div class="layui-col-xs6" style="background-color: rosybrown">
            <div class="grid-demo grid-demo-bg1">
                <div id="test3"></div>
                <%--                    <input id="test3">--%>
            </div>
        </div>
        <!--栅格化 表单部分 -->
        <div class="layui-col-xs6" style="background-color: beige">

            <input  id="rzdate" name="rzdate"/>
            <input  id="leavedate" name="leavedate"/>
            <input type="button" value="重置" id="reset"/>
            <div class="grid-demo">
                <div class="layui-form-item">
                    <label class="layui-form-label">姓名</label>
                    <div class="layui-input-inline">
                        <input type="text" name="username" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">手机号</label>
                    <div class="layui-input-inline">
                        <input type="text" name="username" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">数量</label>
                    <div class="layui-input-inline">
                        <input type="text" name="username" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>

            <div class="layui-form-item" style="margin-top:40px">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="add">确认</button>
                </div>
            </div>

        </div>
    </div>
</form>

<button id="t">获得时间</button>



<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script>
    layui.use('layer', function(){
        var layer = layui.layer;
        layer.msg(123)
    });
    layui.use(['layer','form','table','laydate'], function() {
        var form = layui.form;
        form.on('submit(add)', function (data) {
            alert(13)
            // layer.closeAll();
            return false;
        })
    })
    $("#t").click(function () {
        var t=new Date().getTime()
        const date = new Date(t);
        var outTradeNo="";
        for(var i=0;i<4;i++) //6位随机数，用以加在时间戳后面。
        {
            outTradeNo += Math.floor(Math.random()*10);
        }
        var date1 = date.getFullYear() +""+ (date.getMonth()+1) +""+ date.getDate()+""+outTradeNo;
        console.log(date1);

    })
</script>
</body>
</html>
